# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-yg.lockfile
pkgver=2.3
pkgrel=6
pkgdesc="Lockfile object with timeouts and context manager"
url="https://github.com/yougov/yg.lockfile"
arch="noarch"
license="MIT"
depends="py3-jaraco.functools py3-tempora py3-zc.lockfile"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/y/yg.lockfile/yg.lockfile-$pkgver.tar.gz"
builddir="$srcdir/yg.lockfile-$pkgver"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
0d28f48dd380f8919d592fad85d7aadf40802a23267c2c6751915b65b284c94acd64422454d04a0b45275b6c600b4e880b82a87cef2c38289c464e95eda121ff  yg.lockfile-2.3.tar.gz
"
